<!DOCTYPE html>
<html lang="en">
<#include "common/head.html">

<body class="fix-header fix-sidebar">
<link href="/css/fileinput.css">
<link href="/css/bootstrap.min.css">
<!-- Preloader - style you can find in spinners.css -->
<div class="preloader">
    <svg class="circular" viewBox="25 25 50 50">
        <circle class="path" cx="50" cy="50" r="20" fill="none"
                stroke-width="2" stroke-miterlimit="10"/>
    </svg>
</div>
<!-- Main wrapper  -->
<div id="main-wrapper">
    <!-- header header  -->
    <#include "common/header.html">
    <!-- End header header -->
    <!-- Left Sidebar  -->
    <#include "common/nav.html">
    <!-- End Left Sidebar  -->
    <!-- Page wrapper  -->
    <div class="page-wrapper">
        <!-- 锐高软件 -->
        <#include "/common/ruigao.html">

        <!--
                    作者：offline
                    时间：2018-03-26
                    描述：添加部门信息
                -->

        <div class="container-fluid">
            <!-- Start Page Content -->
            <div class="row justify-content-center">
                <div class="col-lg-12">
                    <div class="card">
                        <div class="card-body">
                            <div class="card-content">
                                <!-- Left sidebar -->
                                <div class="inbox-leftbar">

                                    <a href=""
                                       class="btn btn-danger btn-block waves-effect waves-light">
                                        <font style="vertical-align: inherit;"> <font
                                                style="vertical-align: inherit;">部门列表</font>
                                        </font>
                                    </a>
                                </div>
                                <!-- End Left sidebar -->
                                <div class="inbox-rightbar">
                                    <div class="" role="toolbar">
                                        <div class="btn-group">
                                            <button type="button" class="btn btn-light waves-effect">
                                                <i class="mdi mdi-archive font-18 vertical-middle"></i>
                                            </button>
                                            <button type="button" class="btn btn-light waves-effect">
                                                <i class="mdi mdi-alert-octagon font-18 vertical-middle"></i>
                                            </button>
                                            <button type="button" class="btn btn-light waves-effect">
                                                <i class="mdi mdi-delete-variant font-18 vertical-middle"></i>
                                            </button>
                                        </div>


                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-validation">
                            <form class="form-valide col-lg-8" enctype="multipart/form-data" method="post" id="form"
                                  novalidate="novalidate" style="margin: 0 auto;">
                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-name">手机号码</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-name"
                                               name="userPhone" placeholder="输入部门名称">
                                    </div>
                                </div>


                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-name">注册时间</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-name"
                                               name="userDate" placeholder="输入部门名称">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-phone">头像</label>
                                    <div class="col-lg-10">
                                        <input class="file" type="file" id="imgFile" name="userHeadpor"
                                               multiple="multiple">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-skill">昵称</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-nickname" name="userNickname">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-skill">用户名</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-nickname" name="userName">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-skill">生日</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-nickname" name="userBirthday">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-skill">性别</label>
                                    <div class="col-lg-10">
                                        <select class="form-control" id="val-skill" name="userSex">
                                            <option value="1">男</option>
                                            <option value="2">女</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-skill">简介</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-nickname" name="userSynopsys">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-skill">登陆方式</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-nickname" name="userLoginway">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-skill">可用积分</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-nickname" name="userCoin">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <div class="col-lg-8 ml-auto">
                                        <button type="button"
                                                class="btn btn-success btn sweet-tijiao deptadd">创建
                                        </button>
                                        <input type="hidden" name="dept" value="" id="deptadd">
                                        <button type="reset" class="btn btn-primary ">重置</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- End Container fluid  -->
<!-- footer -->
<#include "common/footer.html">
<!-- End footer -->
<!-- End Page wrapper  -->
<#include "common/js.html">
<script src="/js/jquery-2.0.3.min.js" type="text/javascript"></script>
<script src="/js/fileinput.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/fileinput_locale_zh.js"></script>
<script type="text/javascript">

    $("#imgFile").fileinput({
        uploadUrl: "uploadandadd",//上传的地址
        uploadAsync: true,              //异步上传
        language: "zh",                 //设置语言
        showCaption: true,              //是否显示标题
        showUpload: true,               //是否显示上传按钮
        showRemove: true,               //是否显示移除按钮
        showPreview: true,             //是否显示预览按钮
        browseClass: "btn btn-primary", //按钮样式
        uploadLabel: "上传1",           //设置上传按钮的汉字
        dropZoneEnabled: true,         //是否显示拖拽区域
        allowedFileExtensions: ["jpg", "png"], //接收的文件后缀
        maxFileCount: 1,                        //最大上传文件数限制
        previewFileIcon: '<i class="glyphicon glyphicon-file"></i>',
        allowedPreviewTypes: null,
        previewFileIconSettings: {
            'jpg': '<i class="glyphicon glyphicon-file"></i>',
            'png': '<i class="glyphicon glyphicon-file"></i>'
        }
    }).on("fileuploaded", function (event, data) {
        var response = data.response;
        var html;
        if (response.code == '501') {
            html = "<div style='float:left;'><p style='text-align:left'>内容：  " + response.desp + "<a  href='/../../exportFile/" + response.exportFnm + "'target='_blank'>详情下载。</a></p></div>"
        } else {
            html = "<div style='float:left;'><p style='text-align:left'>内容：  " + response.desp + "></p></div>"
        }
        $(html).appendTo($('#response'));
    }).on('fileerror', function (event, data, msg) {  //一个文件上传失败
        alert('文件上传失败！' + msg);
    });


</script>
</body>

</html>